// @ts-ignore
/* eslint-disable */
import { request } from "@umijs/max";

/** 此处后端没有提供注释 POST /interview/create */
export async function create(
  body: API.InterviewCreateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseInterviewVo>("/interview/create", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /interview/get/${param0} */
export async function getByPage1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getByPage1Params,
  body: API.InterviewQueryRequest,
  options?: { [key: string]: any }
) {
  const { userId: param0, ...queryParams } = params;
  return request<API.BaseResponseListInterviewVo>(`/interview/get/${param0}`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    params: { ...queryParams },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /interview/page */
export async function page(
  body: API.InterviewQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListInterviewVo>("/interview/page", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /interview/start */
export async function startInterview(
  body: API.InterviewStartRequest,
  options?: { [key: string]: any }
) {
  return request<API.SseEmitter>("/interview/start", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /interview/stop */
export async function stop(
  body: API.InterviewStopRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/interview/stop", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
